package com.allen.admin.config.springsession;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.data.redis.RedisFlushMode;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;


/**
 * @author
 */

@Configuration
@EnableRedisHttpSession(redisNamespace="com.admin", redisFlushMode = RedisFlushMode.IMMEDIATE)
public class HttpSessionConfig {

    @Bean
    public LettuceConnectionFactory connectionFactory() {
        return new LettuceConnectionFactory( );
    }



//    @Bean
//    public JedisConnectionFactory connectionFactory() {
//
//        return new JedisConnectionFactory();
//    }
}
